import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: "/login",
      component: () => import("../pages/login/index.vue"),
    },

    {
      path: "/:pathMatch(.*)*",
      component: () => import("../pages/notfound/index.vue"),
    },
    {
      path: "/home",
      component: () => import("../pages/home/index.vue"),
      children: [
        {
          path: "/home",
          redirect: "/home/index",
        },
        {
          path: "/home/index",
          component: () => import("../pages/home/index/index.vue"),
        },
        {
          path: "/ops",
          component: () => import("../pages/home/ops/index.vue"),
        },
        {
          path: "/house",
          component: () => import("../pages/home/houser/index.vue"),
        },
        {
          path: "/calender",
          component: () => import("../pages/home/calender/index.vue"),
        },
        {
          path: "/ptc",
          component: () => import("../pages/home/ptc/index.vue"),
        },
        {
          path: "/ubh",
          component: () => import("../pages/home/ubh/index.vue"),
        },
        {
          path: "/prep",
          component: () => import("../pages/home/prep/index.vue"),
        },
        {
          path: "/market",
          component: () => import("../pages/home/market/index.vue"),
        },
        {
          path: "/inhome",
          component: () => import("../pages/home/inhome/index.vue"),
        },
      ],
    },
  ],
});

export default router;
